<!-- 确认页面 -->
<template>
  <div>
    <el-form :model="checkForm" ref="ruleForm" disabled label-width="150px" class="demo-ruleForm" style="width: 500px; margin-left:50px;">
  
      <el-form-item label="预约合同签署时间" prop="makeContractSignTime">
        <el-input type="text" v-model="checkForm.makeContractSignTime"/>
      </el-form-item>
  
      <el-form-item label="预约签约公证时间" prop="makeNotaryTime">
        <el-input type="text" v-model="checkForm.makeNotaryTime"/>
      </el-form-item>
  
      <el-form-item label="预约办押时间" prop="makePledgeTime">
        <el-input type="text" v-model="checkForm.makePledgeTime"/>
      </el-form-item>

    </el-form>
  </div>
</template>
<script>
  import { findProjectBytId } from '@/api/project'
export default {
    // 接受父组件的值
  props: {
     projectId: undefined
    },
  data() {
    return {
      checkForm: {
        makeContractSignTime: undefined,
        makeNotaryTime: undefined,
        makePledgeTime: undefined
      },
      sendCheckPersons: [],
      value: ''
    };
  },
  created(){
    this.getInfo()
  },
  methods: {
    getInfo() {
      findProjectBytId({projectId:this.projectId})
              .then((data) => {
                 this.checkForm = data.data
              })
              .catch((err) => {
                console.error('操作失败');
              });
    },
    handleChange(val){
      console.log(val)
      this.restForm()
      this.checkForm.approveStatus = val
        // 转派
      if (val === '7') {
        this.opinionFlag = false;
        this.assignUserFlag = true;
        this.checkForm.opinion = '';
        // 查询数据 构造页面
        listUserByRole('审查岗')
          .then((data) => {
            this.sendCheckPersons = data.data;
            console.log('响应数据:%o', data);
          })
          .catch((error) => {
            console.error('请求用户数据发生异常:' + error);
          });
      }
    },
    restForm(){
      this.checkForm = {
        opinion: undefined,
        assignUserId: undefined,
        projectId: undefined,
        approveStatus: undefined
      }
    }
  },
};
</script>
